import request from '@/utils/request'

// 查询商品秒杀列表列表
export function listSpikes(query) {
  return request({
    url: '/spike/spikes/list',
    method: 'get',
    params: query
  })
}

// 查询商品秒杀列表详细
export function getSpikes(id) {
  return request({
    url: '/spike/spikes/' + id,
    method: 'get'
  })
}

// 新增商品秒杀列表
export function addSpikes(data) {
  return request({
    url: '/spike/spikes',
    method: 'post',
    data: data
  })
}

// 修改商品秒杀列表
export function updateSpikes(data) {
  return request({
    url: '/spike/spikes',
    method: 'put',
    data: data
  })
}

// 删除商品秒杀列表
export function delSpikes(id) {
  return request({
    url: '/spike/spikes/' + id,
    method: 'delete'
  })
}
